package Chap11;

import java.util.Scanner;

public class UnusualTest2
{
    public static void main(String[] args)
    {
        String value = "";
        Scanner scan = new Scanner(System.in);
        while(value !="DONE")
        {
            try
            {
                if(value.equals("DONE"))
                    break;
                else
                {
                    System.out.print("Asser without any restraint(\"DONE\" to quit): ");
                    value = scan.nextLine();
                }
                main(value);
            }
            catch (StringTooLongException e)
            {
                System.out.println("STRING IS TO LONG!!!!!!!!");
            }
        }
    }
    static void main(String string) throws StringTooLongException
    {
        StringTooLongException problem = new StringTooLongException("String is to long!!!");
        if(string.length() > 20)
        {
            throw problem;
        }
    }
}
